#!/usr/bin/python
# simulates dice rolls for standard D&D dice
# call each one with how many dice you are rolling
# usage example:
# dice.d10(3)  will be like rolling 3 d10's
# dice.dper() will generate a pseudo percentage number

import random

def d4(many):
        result = (many * random.randint(1,4))
        return result

def d6(many):
        result = (many * random.randint(1,6))
        return result

def d8(many):
        result = (many * random.randint(1,8))
        return result

def d10(many):
        result = (many * random.randint(1,10))
        return result

def d12(many):
        result = (many * random.randint(1,12))
        return result

def d20(many):
        result = (many * random.randint(1,20))
        return result

#used to get a percentage roll (generally 2 d10s) but this is easier
def dper():
        result = random.randint(1,100)
        return result
